﻿using System;
using System.Linq.Expressions;

namespace Fabrication
{
    public class MappedPropertySelector<T, TSource, TTarget>
    {
        public PropertySelector<T, TTarget> TargetPropertySelector { get; private set; }
        public Expression<Func<T, TSource>> SourceMember { get; private set; }

        public MappedPropertySelector(PropertySelector<T, TTarget> targetPropertySelector, Expression<Func<T, TSource>> sourceMember)
        {
            TargetPropertySelector = targetPropertySelector;
            SourceMember = sourceMember;
        }
    }

    public class DoubleMappedPropertySelector<T, TSource1, TSource2, TTarget>
    {
        public PropertySelector<T, TTarget> TargetPropertySelector { get; private set; }
        public Expression<Func<T, TSource1>> SourceMember1 { get; private set; }
        public Expression<Func<T, TSource2>> SourceMember2 { get; private set; }

        public DoubleMappedPropertySelector(PropertySelector<T, TTarget> targetPropertySelector, Expression<Func<T, TSource1>> sourceMember1, Expression<Func<T, TSource2>> sourceMember2)
        {
            TargetPropertySelector = targetPropertySelector;
            SourceMember1 = sourceMember1;
            SourceMember2 = sourceMember2;
        }
    }
}